<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>康纳天花系统后台</title>
<link href="/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="/css/admins/base.css" rel="stylesheet" type="text/css">
<link href="/css/plugs/jDatepicker/jDatepicker-min.css"  rel="stylesheet"  />
<link href="/css/validate.css" rel="stylesheet" type="text/css" />
<script src="/js/plugs/jquery.js"></script>
<script src="/js/admins/base.js"></script>
<script type="text/javascript" src="/js/plugs/jquery.imgupload.js"></script>
<script type="text/javascript" charset="utf-8" src="http://{#$smarty.server.HTTP_HOST#}/js/kindeditor3/kindeditor.js"></script>
<script src="/js/common/validate.js"></script>
<style type="text/css" >
.add-form {
	width:100%;
}
.add-form input{
	width:30em;
}
.uploader_item_box{
    width:115px;
    height:115px;
}
</style>
</head>

<body>

<!-- nav start-->
{# include file="$tpl_root_path/admins/base/navbar.html" #}
<!-- nav end -->    
    
    
    
    
<div class="container-fluid">
    
      <div class="row">
      
    <!-- left  box start-->     
       {# include file="$tpl_root_path/admins/base/left_menu.html" #}
    <!-- left  box end-->        
 
  <!-- right  box start-->  
         
     <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main right-box">
          
          <div class="menu-navbar">系统管理- 友情链接管理-新增友情链接</div>
          <!--<h3 class="page-header">新闻发布 </h3>-->

       
          
          <div class="info-list-box">
          
          <div class="add-form">
                <form class="form-horizontal" method="post"   id="newsForm">

                    <!--<div class="form-group">-->
                        <!--<label for="inputEmail3" class="col-sm-2 control-label" >请选择审核状态<span class="must-fill">*</span></label>-->
                        <!--<div class="col-sm-10">-->
                            <!--<label><input style="width: 15px;" type="radio" name="checkState"   {# if ($data.CHECKSTATE && $data.CHECKSTATE eq 2) #} checked = 'checked' {# /if#}  value="2" >审核通过&nbsp;</label>-->
                            <!--<label><input style="width: 15px;" type="radio" name="checkState"  {# if ($data.CHECKSTATE && $data.CHECKSTATE eq 1) #} checked = 'checked' {# /if#} value="1" >审核不通过&nbsp;</label>-->
                            <!--<label><input style="width: 15px;" type="radio" name="checkState"   {# if ($data.CHECKSTATE==0) #} checked = 'checked' {# /if#} value="0" >待审核&nbsp;</label>-->
                        <!--</div>-->
                    <!--</div>-->

                    <!--<div class="form-group">-->
                        <!--<label for="inputEmail3" class="col-sm-2 control-label" >投放位置<span class="must-fill">*</span></label>-->
                        <!--<div class="col-sm-10">-->
                            <!--<select name="position"  style="width:100px;">-->
                                <!--<option value ="1" {#if $attr.houseType1.value==1 #}selected = "selected"{#/if#}>全部</option>-->
                                <!--<option value ="2" {#if $attr.houseType1.value==2 #}selected = "selected"{#/if#}>首页</option>-->
                            <!--</select>-->
                        <!--</div>-->
                    <!--</div>-->


 
                    <!--<div class="form-group">-->
                      <!--<label for="inputEmail3" class="col-sm-2 control-label" >本站被友链URL<span class="must-fill">*</span></label>-->
                      <!--<div class="col-sm-10">-->
                        <!--<input class="form-control"   type="text" size="30" name="my_link_url"  value="{#$data.MY_LINK_URL#}" defaultshow="2-30个字"  checkitem="isBlank:'T|请填写本站被友链URL',checkUrl:'F|URL格式不正确'" >-->
                      <!--</div>-->
                    <!--</div>-->

                    <div class="form-group">
                        <label for="inputEmail3" class="col-sm-2 control-label" >网站名称<span class="must-fill">*</span></label>
                        <div class="col-sm-10">
                            <input class="form-control"   type="text" size="30" name="siteName"  value="{#$data.SITENAME#}" defaultshow="1-30个字"  checkItem="isBlank:'T|请填写网站名称',computeChar:'>1<30|网站名称不足1个字,网站名称不能超过30个字'" >
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="inputEmail3" class="col-sm-2 control-label" >对方友链URL<span class="must-fill">*</span></label>
                        <div class="col-sm-10">
                            <input class="form-control"   type="text" size="30" name="link_url"  value="{#$data.LINK_URL#}" defaultshow="1-30个字"  checkitem="isBlank:'T|请填写对方友链URL',checkUrl:'F|URL格式不正确'"  >
                        </div>
                    </div>


                    <!--<div class="form-group">-->
                        <!--<label for="inputEmail3" class="col-sm-2 control-label" >网站域名<span class="must-fill">*</span></label>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input class="form-control"   type="text" size="30" name="siteDomain"  value="{#$data.SITEDOMAIN#}" defaultshow="1-30个字"  checkitem="isBlank:'T|请填写网站域名',checkUrl:'F|网站域名格式不正确'" >-->
                        <!--</div>-->
                    <!--</div>-->


                    <!--<div class="form-group">-->
                        <!--<label for="inputEmail3" class="col-sm-2 control-label" >链接名称<span class="must-fill">*</span></label>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input class="form-control"   type="text" size="30" name="link_name"  value="{#$data.LINK_NAME#}" defaultshow="1-30个字"  checkitem="isBlank:'T|请填写链接名称',checkUrl:'F|链接名称格式不正确'" >-->
                        <!--</div>-->
                    <!--</div>-->

                    <!--<div class="form-group">-->
                        <!--<label for="inputEmail3" class="col-sm-2 control-label" >放置本站的链接<span class="must-fill">*</span></label>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input class="form-control"   type="text" size="30" name="place_my_url"  value="{#$data.PLACE_MY_URL#}" defaultshow="2-30个字"   checkitem="isBlank:'T|请填写放置本站的链接',checkUrl:'F|链接名称格式不正确'" >-->
                        <!--</div>-->
                    <!--</div>-->

                    <!--<div class="form-group">-->
                        <!--<label for="inputEmail3" class="col-sm-2 control-label" >pr值<span class="must-fill">*</span></label>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input class="form-control"  style="width:10em;"  type="text" size="10" name="pr"  value="{#$data.pr#}" defaultshow="2-30个字"   checkitem="isBlank:'T|请填写PR值',checkPositiveNumber:'F|请输入PR值'" >-->
                        <!--</div>-->
                    <!--</div>-->


                    <!--<div class="form-group">-->
                        <!--<label for="inputEmail3" class="col-sm-2 control-label" >联系人<span class="must-fill">*</span></label>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input class="form-control"   type="text" size="30" name="contact"  value="{#$data.CONTACT#}" defaultshow="请输入联系人" checkitem="isBlank:'T|请填写联系人',computeChar:'<15|联系人长度不能超过15',regCheck:'T|\\d+|联系人中不能含有数字'" >-->
                        <!--</div>-->
                    <!--</div>-->


                    <!--<div class="form-group">-->
                        <!--<label for="inputEmail3" class="col-sm-2 control-label" >邮箱<span class="must-fill">*</span></label>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input  class="form-control" type="text"  value="{#$data.EMAIL#}" name="email" defaultshow="请输入邮箱" checkitem="isBlank:'T|请填写邮箱',checkMail:'F|F|邮箱格式错误'" maxlength="50"/>-->
                        <!--</div>-->
                    <!--</div>-->

                    <!--<div class="form-group">-->
                        <!--<label for="inputEmail3" class="col-sm-2 control-label" >联系信息<span class="must-fill">*</span></label>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input  class="form-control" type="text"    value="{#$data.CONTACT_INFO#}"  name="contact_info" defaultshow="请输入手机" checkitem="isBlank:'T|请填写手机号码',checkMobile:'F|手机号码格式错误'" maxlength="11"/>-->
                        <!--</div>-->
                    <!--</div>-->

                    <!--<div class="form-group">-->
                        <!--<label for="inputEmail3" class="col-sm-2 control-label" >备注<span class="must-fill">*</span></label>-->
                        <!--<div class="col-sm-10" >-->

                            <!--<textarea name="remarks" id="remarks"   style="width:750px;height:100px;" >{#$data.REMARKS#}</textarea>-->

                            <!--&lt;!&ndash;<div class="infotips" style="color:#F00;"></div>&ndash;&gt;-->

                        <!--</div>-->

                    <!--</div>-->



                     
                    <div class="form-group">
                      <div class="col-sm-offset-2 col-sm-10">
                        <button type="button" name="sub"  class="btn btn-success" onclick="return checkPublish();">保&nbsp;&nbsp;存</button>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp;&nbsp;
                        <a  href="/admins/friendly_links.html" class="btn btn-default">返&nbsp;&nbsp;回</a>
                      </div>
                    </div>
               </form>
          </div>
    
          </div>
          
 

          
     </div>
 
  <!-- right  box end-->         
        
      </div>
</div>



</body>
</html>

<script type="text/javascript">

    //图片上传

    {# if  $imgjs #}
	
	{#$imgjs#}

    {#else#}
      $.imgUploader({
        containerid:'imgup',
        dir:'news',
        img_cnt_limit:1,
        max_file_size:1024,
        prevent_duplicates:1,
        extensions:'jpg,jpeg,gif,png',
        multi_selection:true,
        min_img_width:0,
        min_img_height:0,
        single_file:true
    });
    {#/if#}

    $("#imgup").bind("UploadComplete",function() {
        $('.form_tips').addClass(" form-ok").css("display","inline-block");
    });

 

    function checkPublish() {
        if (!validate()){
            return false;
		}
        //验证图片
        var pic = $("#imgup_filelist").html();
        if(pic == ''){

            $('.news_tips ').removeClass('form-ok').addClass("form-no").css("display","inline-block").text('请上传图片');
            return false;
        }else {
            $('.news_tips').removeClass('form-no form_error_tips').addClass("form-ok").css("display","inline-block").text(' ');

        }
		$('#newsForm').submit()
        return true
    }
 
 
 //编辑器验证通过/不通过时的回调函数
function keErr(){
    $(".ke-container").css('border-color','red');
}
function keSuc(){
    $(".ke-container").css('border-color','#ccc');
}

 //int function
 $(function(){
	 KE.show({id:'info',
        afterCreate: function(){
            var countDiv = '<div class="count-div"><span>字数：<span class="html-count"></span>(含HTML数,该字数不得超过50000)</span></div>';
            $('.ke-bottom-outer').html(countDiv);
        },
        afterFocus: function(){
            $(".ke-container").css('border-color','#0096ff');
            $('span#info_err_text').hide();
            $('.infotips').removeClass('Validform_wrong Validform_right').addClass('form_tips').text('不能含有联系方式').show();
        },
        afterBlur:function(){
            $('.infotips').hide();
            KE.sync('info');
            if($('#info').triggerHandler('blur')){
                $(".ke-container").css('border-color','#ccc');
            }else{
                $(".ke-container").css('border-color','red');
            };
        },
        afterChange : function(){
            $('.html-count').text(KE.count('info','html'));
        }
});

	 
 });
</script>